package com.luojing.proxy.p1;

/**
 * @author luojing
 * @create 2018/08/31 上午9:20
 **/
public class TestProxy {

  public static void main(String[] args) {
    ProxyHandler proxyHandler = new ProxyHandler();
    Subject sub = (Subject)proxyHandler.bind(new RealSubject());
    sub.doSometing();

    CGLibHandler cgLibHandler = new CGLibHandler();
    sub = (Subject) cgLibHandler.createObject(new RealSubject());
    sub.doSometing();
  }
}
